Dynomotion

Group: DynoMotion Message: 4261 From: toby_rule Date: 3/18/2012
Subject: Initializing KM_Interpreter using KMotion_dotNet
Hello,

I am trying to use the simulate feature of the KMotion interpreter in KMotion_dotNet. How do I initialize the KMotion interpreter without a board attached? I tried doing something like:

.KM_Controller.KM_Interpreter kmInterpreter = new KMotion_dotNet.KM_Controller.KM_Interpreter(0);

But it gave me a fairly non-verbose DMException, which I am attaching below.

I spent quite a bit of time working with the KMotionCNC code (C++/MFC) but that was a couple years ago, and I'm new to the dot net interface. So the solution is probably obvious, but a couple hours searching didn't turn anything up so hopefully you can assist me.

Thanks,

Toby Rule


KMotion_dotNet.DMException was caught
Message=Exception of type 'KMotion_dotNet.DMException' was thrown.
Source=KMotion_dotNet
StackTrace:
at KMotion_dotNet.KM_Controller.KM_Interpreter..ctor(Int32 boardnumber)
at LaserTech.eCut.SimProgramModel..ctor() in C:\Users\trule\Documents\LCM\lcm\ProgramControl\SimProgramModel.cs:line 32
InnerException:
Group: DynoMotion Message: 4262 From: himykabibble Date: 3/18/2012
Subject: Re: Initializing KM_Interpreter using KMotion_dotNet
Could be wrong, but I *think* you want to set the CoordMotion.IsSimulation() property true to enable simulation. I also don't think you need (or want) to explicitly create the KM_Interpreter. Just create the KM_Controller, and it will create the KM_Interpreter for you.

Regards,
Ray L.

--- In DynoMotion@yahoogroups.com, "toby_rule" <trule@...> wrote:
>
> Hello,
>
> I am trying to use the simulate feature of the KMotion interpreter in KMotion_dotNet. How do I initialize the KMotion interpreter without a board attached? I tried doing something like:
>
> .KM_Controller.KM_Interpreter kmInterpreter = new KMotion_dotNet.KM_Controller.KM_Interpreter(0);
>
> But it gave me a fairly non-verbose DMException, which I am attaching below.
>
> I spent quite a bit of time working with the KMotionCNC code (C++/MFC) but that was a couple years ago, and I'm new to the dot net interface. So the solution is probably obvious, but a couple hours searching didn't turn anything up so hopefully you can assist me.
>
> Thanks,
>
> Toby Rule
>
>
> KMotion_dotNet.DMException was caught
> Message=Exception of type 'KMotion_dotNet.DMException' was thrown.
> Source=KMotion_dotNet
> StackTrace:
> at KMotion_dotNet.KM_Controller.KM_Interpreter..ctor(Int32 boardnumber)
> at LaserTech.eCut.SimProgramModel..ctor() in C:\Users\trule\Documents\LCM\lcm\ProgramControl\SimProgramModel.cs:line 32
> InnerException:
>
Group: DynoMotion Message: 4263 From: Toby Rule Date: 3/19/2012
Subject: Re: Initializing KM_Interpreter using KMotion_dotNet
Attachments :

     

    Hi Ray,

     

    Thanks for tip tip.  I think the problem my be solved.  Strangely my laptop’s behavior changed between 1:30 am at home  and 9:00 am at work.  Now it’s giving me a message that says it’s a dll loading error. That’s a problem I can solve.

     

    Regards,

    Toby

     

    From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of himykabibble
    Sent: Monday, March 19, 2012 1:46 AM
    To: DynoMotion@yahoogroups.com
    Subject: [DynoMotion] Re: Initializing KM_Interpreter using KMotion_dotNet

     

     

    Could be wrong, but I *think* you want to set the CoordMotion.IsSimulation() property true to enable simulation. I also don't think you need (or want) to explicitly create the KM_Interpreter. Just create the KM_Controller, and it will create the KM_Interpreter for you.

    Regards,
    Ray L.

    --- In DynoMotion@yahoogroups.com, "toby_rule" <trule@...> wrote:
    >
    > Hello,
    >
    > I am trying to use the simulate feature of the KMotion interpreter in KMotion_dotNet. How do I initialize the KMotion interpreter without a board attached? I tried doing something like:
    >
    > .KM_Controller.KM_Interpreter kmInterpreter = new KMotion_dotNet.KM_Controller.KM_Interpreter(0);
    >
    > But it gave me a fairly non-verbose DMException, which I am attaching below.
    >
    > I spent quite a bit of time working with the KMotionCNC code (C++/MFC) but that was a couple years ago, and I'm new to the dot net interface. So the solution is probably obvious, but a couple hours searching didn't turn anything up so hopefully you can assist me.
    >
    > Thanks,
    >
    > Toby Rule
    >
    >
    > KMotion_dotNet.DMException was caught
    > Message=Exception of type 'KMotion_dotNet.DMException' was thrown.
    > Source=KMotion_dotNet
    > StackTrace:
    > at KMotion_dotNet.KM_Controller.KM_Interpreter..ctor(Int32 boardnumber)
    > at LaserTech.eCut.SimProgramModel..ctor() in C:\Users\trule\Documents\LCM\lcm\ProgramControl\SimProgramModel.cs:line 32
    > InnerException:
    >

    The information contained in this transmission is intended only for the person or entity
    to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
    material. If you are not the intended recipient, please contact the sender immediately
    and destroy the material in its entirety, whether electronic or hard copy. You are
    notified that any review, retransmission, copying, disclosure, dissemination or other
    use of, or taking of any action in reliance upon this information by persons or entities 
    other than the intended recipient is prohibited.
    
    
    Group: DynoMotion Message: 4264 From: brad murry Date: 3/19/2012
    Subject: Re: Initializing KM_Interpreter using KMotion_dotNet
    Attachments :
      Hello Toby,


      The most common cause of that issue is having your project in the Any PC configuration on a 64bit machine.  Set your solution's build settings to x86.

      -Brad Murry

      From: Toby Rule
      Sent: 3/19/2012 5:45 AM
      To: DynoMotion@yahoogroups.com
      Subject: RE: [DynoMotion] Re: Initializing KM_Interpreter using KMotion_dotNet

       

       

      Hi Ray,

       

      Thanks for tip tip.  I think the problem my be solved.  Strangely my laptop’s behavior changed between 1:30 am at home  and 9:00 am at work.  Now it’s giving me a message that says it’s a dll loading error. That’s a problem I can solve.

       

      Regards,

      Toby

       

      From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of himykabibble
      Sent: Monday, March 19, 2012 1:46 AM
      To: DynoMotion@yahoogroups.com
      Subject: [DynoMotion] Re: Initializing KM_Interpreter using KMotion_dotNet

       

       

      Could be wrong, but I *think* you want to set the CoordMotion.IsSimulation() property true to enable simulation. I also don't think you need (or want) to explicitly create the KM_Interpreter. Just create the KM_Controller, and it will create the KM_Interpreter for you.

      Regards,
      Ray L.

      --- In DynoMotion@yahoogroups.com, "toby_rule" <trule@...> wrote:
      >
      > Hello,
      >
      > I am trying to use the simulate feature of the KMotion interpreter in KMotion_dotNet. How do I initialize the KMotion interpreter without a board attached? I tried doing something like:
      >
      > .KM_Controller.KM_Interpreter kmInterpreter = new KMotion_dotNet.KM_Controller.KM_Interpreter(0);
      >
      > But it gave me a fairly non-verbose DMException, which I am attaching below.
      >
      > I spent quite a bit of time working with the KMotionCNC code (C++/MFC) but that was a couple years ago, and I'm new to the dot net interface. So the solution is probably obvious, but a couple hours searching didn't turn anything up so hopefully you can assist me.
      >
      > Thanks,
      >
      > Toby Rule
      >
      >
      > KMotion_dotNet.DMException was caught
      > Message=Exception of type 'KMotion_dotNet.DMException' was thrown.
      > Source=KMotion_dotNet
      > StackTrace:
      > at KMotion_dotNet.KM_Controller.KM_Interpreter..ctor(Int32 boardnumber)
      > at LaserTech.eCut.SimProgramModel..ctor() in C:\Users\trule\Documents\LCM\lcm\ProgramControl\SimProgramModel.cs:line 32
      > InnerException:
      >

      The information contained in this transmission is intended only for the person or entity
      to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
      material. If you are not the intended recipient, please contact the sender immediately
      and destroy the material in its entirety, whether electronic or hard copy. You are
      notified that any review, retransmission, copying, disclosure, dissemination or other
      use of, or taking of any action in reliance upon this information by persons or entities 
      other than the intended recipient is prohibited.
      
      

      Group: DynoMotion Message: 4265 From: Tom Kerekes Date: 3/19/2012
      Subject: Re: Initializing KM_Interpreter using KMotion_dotNet
      Hi Toby,
       
      Make sure you are using the latest V4.29z code.
       
      The simplest method is to target your application to be in the C:\KMotion429z\KMotion\Release directory.  Otherwise the correct KMotion DLLs and other files may not be located properly.
       
      To create the Interpreter object you should do something like:
       
      public partial class Form1 : Form
      {
      KM_Controller _Controller; //Object to interface with the Kflop
      KM_CoordMotion _CoordMotion;
      KM_Interpreter _Interpreter;
       
       
       
      public Form1()
      {
      InitializeComponent();
      _Controller =
      new KMotion_dotNet.KM_Controller();
      _CoordMotion =
      new KMotion_dotNet.KM_CoordMotion(_Controller);
      _Interpreter =
      new KMotion_dotNet.KM_Interpreter(_CoordMotion);
       
       
      Regards
      TK